3.70 \(\int \frac{\sin (e+f x)}{(a+b \tan ^2(e+f x))^2} \, dx\)

Optimal. Leaf size=101 \[ -\frac{3 \cos (e+f x)}{2 f (a-b)^2}+\frac{\cos (e+f x)}{2 f (a-b) \left (a+b \sec ^2(e+f x)-b\right )}-\frac{3 \sqrt{b} \tan ^{-1}\left (\frac{\sqrt{b} \sec (e+f x)}{\sqrt{a-b}}\right )}{2 f (a-b)^{5/2}} \]

[Out]

(-3*Sqrt[b]*ArcTan[(Sqrt[b]*Sec[e + f*x])/Sqrt[a - b]])/(2*(a - b)^(5/2)*f) - (3*Cos[e + f*x])/(2*(a - b)^2*f)
 + Cos[e + f*x]/(2*(a - b)*f*(a - b + b*Sec[e + f*x]^2))

________________________________________________________________________________________

Rubi [A]  time = 0.0731347, antiderivative size = 101, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {3664, 290, 325, 205} \[ -\frac{3 \cos (e+f x)}{2 f (a-b)^2}+\frac{\cos (e+f x)}{2 f (a-b) \left (a+b \sec ^2(e+f x)-b\right )}-\frac{3 \sqrt{b} \tan ^{-1}\left (\frac{\sqrt{b} \sec (e+f x)}{\sqrt{a-b}}\right )}{2 f (a-b)^{5/2}} \]

Antiderivative was successfully verified.

[In]

Int[Sin[e + f*x]/(a + b*Tan[e + f*x]^2)^2,x]

[Out]

(-3*Sqrt[b]*ArcTan[(Sqrt[b]*Sec[e + f*x])/Sqrt[a - b]])/(2*(a - b)^(5/2)*f) - (3*Cos[e + f*x])/(2*(a - b)^2*f)
 + Cos[e + f*x]/(2*(a - b)*f*(a - b + b*Sec[e + f*x]^2))

Rule 3664

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sec[e + f*x], x]}, Dist[1/(f*ff^m), Subst[Int[((-1 + ff^2*x^2)^((m - 1)/2)*(a - b + b*ff^2*x^2)^p)/x^(
m + 1), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rule 290

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> -Simp[((c*x)^(m + 1)*(a + b*x^n)^(p + 1))/(
a*c*n*(p + 1)), x] + Dist[(m + n*(p + 1) + 1)/(a*n*(p + 1)), Int[(c*x)^m*(a + b*x^n)^(p + 1), x], x] /; FreeQ[
{a, b, c, m}, x] && IGtQ[n, 0] && LtQ[p, -1] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 325

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[((c*x)^(m + 1)*(a + b*x^n)^(p + 1))/(a*
c*(m + 1)), x] - Dist[(b*(m + n*(p + 1) + 1))/(a*c^n*(m + 1)), Int[(c*x)^(m + n)*(a + b*x^n)^p, x], x] /; Free
Q[{a, b, c, p}, x] && IGtQ[n, 0] && LtQ[m, -1] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\sin (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1}{x^2 \left (a-b+b x^2\right )^2} \, dx,x,\sec (e+f x)\right )}{f}\\ &=\frac{\cos (e+f x)}{2 (a-b) f \left (a-b+b \sec ^2(e+f x)\right )}+\frac{3 \operatorname{Subst}\left (\int \frac{1}{x^2 \left (a-b+b x^2\right )} \, dx,x,\sec (e+f x)\right )}{2 (a-b) f}\\ &=-\frac{3 \cos (e+f x)}{2 (a-b)^2 f}+\frac{\cos (e+f x)}{2 (a-b) f \left (a-b+b \sec ^2(e+f x)\right )}-\frac{(3 b) \operatorname{Subst}\left (\int \frac{1}{a-b+b x^2} \, dx,x,\sec (e+f x)\right )}{2 (a-b)^2 f}\\ &=-\frac{3 \sqrt{b} \tan ^{-1}\left (\frac{\sqrt{b} \sec (e+f x)}{\sqrt{a-b}}\right )}{2 (a-b)^{5/2} f}-\frac{3 \cos (e+f x)}{2 (a-b)^2 f}+\frac{\cos (e+f x)}{2 (a-b) f \left (a-b+b \sec ^2(e+f x)\right )}\\ \end{align*}

Mathematica [A]  time = 0.764116, size = 146, normalized size = 1.45 \[ \frac{\frac{2 \cos (e+f x) \left (-\frac{b}{(a-b) \cos (2 (e+f x))+a+b}-1\right )}{(a-b)^2}+\frac{3 \sqrt{b} \tan ^{-1}\left (\frac{\sqrt{a-b}-\sqrt{a} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{b}}\right )}{(a-b)^{5/2}}+\frac{3 \sqrt{b} \tan ^{-1}\left (\frac{\sqrt{a-b}+\sqrt{a} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{b}}\right )}{(a-b)^{5/2}}}{2 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[e + f*x]/(a + b*Tan[e + f*x]^2)^2,x]

[Out]

((3*Sqrt[b]*ArcTan[(Sqrt[a - b] - Sqrt[a]*Tan[(e + f*x)/2])/Sqrt[b]])/(a - b)^(5/2) + (3*Sqrt[b]*ArcTan[(Sqrt[
a - b] + Sqrt[a]*Tan[(e + f*x)/2])/Sqrt[b]])/(a - b)^(5/2) + (2*Cos[e + f*x]*(-1 - b/(a + b + (a - b)*Cos[2*(e
 + f*x)])))/(a - b)^2)/(2*f)

________________________________________________________________________________________

Maple [A]  time = 0.067, size = 114, normalized size = 1.1 \begin{align*} -{\frac{\cos \left ( fx+e \right ) }{f \left ({a}^{2}-2\,ab+{b}^{2} \right ) }}-{\frac{b\cos \left ( fx+e \right ) }{2\,f \left ( a-b \right ) ^{2} \left ( a \left ( \cos \left ( fx+e \right ) \right ) ^{2}- \left ( \cos \left ( fx+e \right ) \right ) ^{2}b+b \right ) }}+{\frac{3\,b}{2\,f \left ( a-b \right ) ^{2}}\arctan \left ({ \left ( a-b \right ) \cos \left ( fx+e \right ){\frac{1}{\sqrt{b \left ( a-b \right ) }}}} \right ){\frac{1}{\sqrt{b \left ( a-b \right ) }}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(f*x+e)/(a+b*tan(f*x+e)^2)^2,x)

[Out]

-1/f/(a^2-2*a*b+b^2)*cos(f*x+e)-1/2/f*b/(a-b)^2*cos(f*x+e)/(a*cos(f*x+e)^2-cos(f*x+e)^2*b+b)+3/2/f*b/(a-b)^2/(
b*(a-b))^(1/2)*arctan((a-b)*cos(f*x+e)/(b*(a-b))^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)/(a+b*tan(f*x+e)^2)^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.94515, size = 699, normalized size = 6.92 \begin{align*} \left [-\frac{4 \,{\left (a - b\right )} \cos \left (f x + e\right )^{3} - 3 \,{\left ({\left (a - b\right )} \cos \left (f x + e\right )^{2} + b\right )} \sqrt{-\frac{b}{a - b}} \log \left (\frac{{\left (a - b\right )} \cos \left (f x + e\right )^{2} + 2 \,{\left (a - b\right )} \sqrt{-\frac{b}{a - b}} \cos \left (f x + e\right ) - b}{{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}\right ) + 6 \, b \cos \left (f x + e\right )}{4 \,{\left ({\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} f \cos \left (f x + e\right )^{2} +{\left (a^{2} b - 2 \, a b^{2} + b^{3}\right )} f\right )}}, -\frac{2 \,{\left (a - b\right )} \cos \left (f x + e\right )^{3} + 3 \,{\left ({\left (a - b\right )} \cos \left (f x + e\right )^{2} + b\right )} \sqrt{\frac{b}{a - b}} \arctan \left (-\frac{{\left (a - b\right )} \sqrt{\frac{b}{a - b}} \cos \left (f x + e\right )}{b}\right ) + 3 \, b \cos \left (f x + e\right )}{2 \,{\left ({\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} f \cos \left (f x + e\right )^{2} +{\left (a^{2} b - 2 \, a b^{2} + b^{3}\right )} f\right )}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)/(a+b*tan(f*x+e)^2)^2,x, algorithm="fricas")

[Out]

[-1/4*(4*(a - b)*cos(f*x + e)^3 - 3*((a - b)*cos(f*x + e)^2 + b)*sqrt(-b/(a - b))*log(((a - b)*cos(f*x + e)^2
+ 2*(a - b)*sqrt(-b/(a - b))*cos(f*x + e) - b)/((a - b)*cos(f*x + e)^2 + b)) + 6*b*cos(f*x + e))/((a^3 - 3*a^2
*b + 3*a*b^2 - b^3)*f*cos(f*x + e)^2 + (a^2*b - 2*a*b^2 + b^3)*f), -1/2*(2*(a - b)*cos(f*x + e)^3 + 3*((a - b)
*cos(f*x + e)^2 + b)*sqrt(b/(a - b))*arctan(-(a - b)*sqrt(b/(a - b))*cos(f*x + e)/b) + 3*b*cos(f*x + e))/((a^3
 - 3*a^2*b + 3*a*b^2 - b^3)*f*cos(f*x + e)^2 + (a^2*b - 2*a*b^2 + b^3)*f)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)/(a+b*tan(f*x+e)**2)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.37288, size = 207, normalized size = 2.05 \begin{align*} -\frac{f^{3} \cos \left (f x + e\right )}{a^{2} f^{4} - 2 \, a b f^{4} + b^{2} f^{4}} + \frac{3 \, b \arctan \left (\frac{a \cos \left (f x + e\right ) - b \cos \left (f x + e\right )}{\sqrt{a b - b^{2}}}\right )}{2 \,{\left (a^{2} - 2 \, a b + b^{2}\right )} \sqrt{a b - b^{2}} f} - \frac{b \cos \left (f x + e\right )}{2 \,{\left (a \cos \left (f x + e\right )^{2} - b \cos \left (f x + e\right )^{2} + b\right )}{\left (a^{2} - 2 \, a b + b^{2}\right )} f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)/(a+b*tan(f*x+e)^2)^2,x, algorithm="giac")

[Out]

-f^3*cos(f*x + e)/(a^2*f^4 - 2*a*b*f^4 + b^2*f^4) + 3/2*b*arctan((a*cos(f*x + e) - b*cos(f*x + e))/sqrt(a*b -
b^2))/((a^2 - 2*a*b + b^2)*sqrt(a*b - b^2)*f) - 1/2*b*cos(f*x + e)/((a*cos(f*x + e)^2 - b*cos(f*x + e)^2 + b)*
(a^2 - 2*a*b + b^2)*f)